<?php /* Smarty version 2.6.13, created on 2013-10-09 19:40:38
         compiled from Admin/ProM/prom.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date', 'Admin/ProM/prom.html', 89, false),)), $this); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="../Public/Css/userp.css" />
<script type="text/javascript" src="../Public/Js/choose.js"></script>
<script type="text/javascript" src="../Public/Js/jquery.js"></script>
</head>
<body>
<div class="content">

	<div class="pos">
		<div class="posDe">当前位置 : <font style="color:blue;">产品管理&gt;管理产品</font></div>
	</div>
	
	<div id="prom">
	<div style='margin-top:5px;'>
		<form action="ProM.php" method='get'>
				<input type='hidden' name='flag' value='display'/>
				食品名称：<input type='text' size='10' name='food_name'/>
				提&nbsp;供&nbsp;商：<select name='food_from'>
									<?php $_from = $this->_tpl_vars['cpData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['cv']):
?>
										<option value='<?php echo $this->_tpl_vars['cv']['cp_id']; ?>
'><?php echo $this->_tpl_vars['cv']['cp_name']; ?>
</option>
									<?php endforeach; endif; unset($_from); ?>
								</select>
				食品类型：<select name='food_type'>
						<option value=''>--请选择--</option>
						<option value='1'>节令食品</option>
						<option value='2'>四季食品</option>
						<option value='3'>儿童食品</option>
					  </select>
				价格范围：<input type='text' name='pricemin' size='2'/>~<input type='text' size='2' name='pricemax'/>元
				是否过期：<input type='radio' name='dated' value='1'/>已过期
					  <input type='radio' name='dated' value='0'/>未过期
				<input type='submit' value='搜索'/>
		</form>
	</div>
	<form action="ProM.php?flag=delMore" method='post'>
		<table>
			<tr>
				<th><input type='checkbox' name='All' onclick='checkboxChooseAll();'/></th>
				<th>食品编号</th>
				<th>食品名称</th>
				<th>提供商</th>
				<th>食品类型</th>
				<th>食品价格</th>
				<th>会员价格</th>
				<th>点击率</th>
				<th>是否推荐</th>
				<th>添加时间</th>
				<th>生产日期</th>
				<th>过期时间</th>
				<th>操作</th>
			</tr>
			<?php $_from = $this->_tpl_vars['proData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['v']):
?>
			<tr>
<!-- 			<td><img src='../Public/Images/off.gif'></td> -->
			<td><input type='checkbox' name='each[]' value='<?php echo $this->_tpl_vars['v']['food_id']; ?>
'/></td>
			<td><?php echo $this->_tpl_vars['v']['food_id']; ?>
</td>
			<td><?php echo $this->_tpl_vars['v']['food_name']; ?>
</td>
			<td>
							<?php $_from = $this->_tpl_vars['cpData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['cpv']):
?>
					<?php if ($this->_tpl_vars['cpv']['cp_id'] == $this->_tpl_vars['v']['food_from']): ?>
					<?php echo $this->_tpl_vars['cpv']['cp_name']; ?>

					<?php endif; ?>
				<?php endforeach; endif; unset($_from); ?>
			</td>
			<td>
				<?php if ($this->_tpl_vars['v']['food_type'] == 1): ?>
					节令食品
				<?php elseif ($this->_tpl_vars['v']['food_type'] == 2): ?>
					四季食品
				<?php else: ?>
					儿童食品
				<?php endif; ?>
			</td>
			<td><?php echo $this->_tpl_vars['v']['food_singleprice']; ?>
元</td>
			<td><?php echo $this->_tpl_vars['v']['food_userprice']; ?>
元</td>
			<td><?php echo $this->_tpl_vars['v']['food_count']; ?>
</td>
			<td>
				<?php if ($this->_tpl_vars['v']['food_state'] == 0): ?>
					<font style='color:green;'>正常</font>
				<?php else: ?>
					<font style='color:#E75607;'>推荐</font>
				<?php endif; ?>
			</td>
			<td><?php echo ((is_array($_tmp="Y-m-d")) ? $this->_run_mod_handler('date', true, $_tmp, $this->_tpl_vars['v']['food_addtime']) : date($_tmp, $this->_tpl_vars['v']['food_addtime'])); ?>
</td>
			<td><?php echo ((is_array($_tmp="Y-m-d")) ? $this->_run_mod_handler('date', true, $_tmp, $this->_tpl_vars['v']['food_producttime']) : date($_tmp, $this->_tpl_vars['v']['food_producttime'])); ?>
</td>
			<td>
				<?php if ($this->_tpl_vars['v']['endflag'] == 1): ?>
					<font style='color:red;'><?php echo ((is_array($_tmp="Y-m-d")) ? $this->_run_mod_handler('date', true, $_tmp, $this->_tpl_vars['v']['food_enddate']) : date($_tmp, $this->_tpl_vars['v']['food_enddate'])); ?>
</font>
				<?php else: ?>
					<font style='color:green;'><?php echo ((is_array($_tmp="Y-m-d")) ? $this->_run_mod_handler('date', true, $_tmp, $this->_tpl_vars['v']['food_enddate']) : date($_tmp, $this->_tpl_vars['v']['food_enddate'])); ?>
</font>
				<?php endif; ?>
			</td>
			<td><a href="ProM.php?flag=prodelete&food_id=<?php echo $this->_tpl_vars['v']['food_id']; ?>
">[删除]</a><a href="ProUpdate.php?flag=display&food_id=<?php echo $this->_tpl_vars['v']['food_id']; ?>
">[修改]</a></td>
			</tr>
			<?php endforeach; else: ?>
			<tr><td colspan="12"><center>暂时没有产品信息</center></td></tr>
			<?php endif; unset($_from); ?>
		</table>
		<div style='border:0px solid red;width:400px;margin-left:10px;'><input type="button" value="全选" onclick="buttonChooseAll();"><input type="button" value="反选" onclick="buttonReChoose();">&nbsp;&nbsp;<input type="submit" value="删除选中"></div>
		</form>
		<div>
			<?php echo $this->_tpl_vars['pageStr']; ?>

		</div>
	</div>

</div>
</body>
